-- GENERATED SPELL FOR [Horgus the Ravager] --


function spell0_10946(pUnit, Event) --@Ravenous Claw,Heal--
pUnit:FullCastSpellOnTarget(15608,pUnit)
pUnit:RegisterEvent('Sorts_10946', 563, 1)
end

function spell1_10946(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_10946', 609, 1)
end

function spell2_10946(pUnit, Event) --@Unholy Aura,Self--
pUnit:FullCastSpellOnTarget(17467,pUnit)
pUnit:RegisterEvent('Sorts_10946', 0, 1)
end

function Sorts_10946(pUnit, Event)
local choix_sorts_10946 = math.random(0, 2)
if choix_sorts_10946 == 0 then
pUnit:RegisterEvent('spell0_10946', 1, 1)
end
if choix_sorts_10946 == 1 then
pUnit:RegisterEvent('spell1_10946', 1, 1)
end
if choix_sorts_10946 == 2 then
pUnit:RegisterEvent('spell2_10946', 1, 1)
end
end

function mob10946_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10946', math.random(1500, 3000), 1)
end

function mob10946_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10946_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10946_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10946, 1, 'mob10946_Action')
RegisterUnitEvent(10946, 2, 'mob10946_Leave')
RegisterUnitEvent(10946, 3, 'mob10946_Kill')
RegisterUnitEvent(10946, 4, 'mob10946_Die')
